#include<stdio.h>
int F[13]={0};
int fact(int n)
{
    if(F[n])
        return F[n];
    if(n<=1)
        return F[n]=1;
    return F[n]=fact(n-1)*n;
}

int main()
{
    int n;
    while(1==scanf("%d",&n))
        printf("%d\n",fact(n));
    return 0;
}
